<?=$this->load->view('include_header',null)?>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li class="current"><a href="<?=site_url('archive/idcard/'.$id)?>" class="report"><?=(empty($id))?"录入新":"编辑"?>客户基本信息</a></li>
				<?php if(!empty($info->id)):?><li><a id="printInfo" class="folder_table">打印本页信息</a></li><?php endif;?>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<div id="box">
<!-- table begin -->
<form method="post" id="form"  enctype="multipart/form-data" action="<?=site_url('schengen/na_update/'.$cateid)?>">

	<h3>纳米比亚申请表</h3>
    <table width="100%">
    <thead>
        <tr>
          <td colspan="4" align="right"><img src="<?= (@$info->avatar)?@$info->avatar:'images/avatar.gif'?>" width="150" height="150" /></td>
		  <td align="right">
		  上传照片<br />
		  <input type="file" name="userphoto" /><br />
		  (.gif|.jpg|.png文件,最大1M)<br />
		  <?php if (@$info->attachment):?><a href="<?= @$info->attachment?>" target="_blank">点击下载附件</a><?php endif; ?>
		  &nbsp;&nbsp;&nbsp;&nbsp;上传附件<br />
		  <input type="file" name="userfile" /><br />
		  (.pdf|.zip|.rar|.doc,最大2M)		  </td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td colspan="5" align="right">			
			<input type="hidden" name="id" value="<?=$id?>" />
			<input id="button1" type="submit" value="提交信息" />
			<input id="button2" type="reset" value="重置" />			</td>
        </tr>
    </tfoot>

    <tbody>
        <tr class="odd">
            <td>1. Surname</td>
            <td><input type="text" name="surname" value="<?= @$info->surname?>" /></td>
            <td>&nbsp;</td>
            <td>2. First Names </td>
            <td><input type="text" name="firstname" value="<?= @$info->firstname?>" /></td>
        </tr>
        <tr class="even">
            <td>3. Maiden Name (if applicant is or was a married woman)</td>
            <td><input type="text" name="maidenname" value="<?= @$info->maidenname?>" /></td>
            <td>&nbsp;</td>
            <td>4. Sex</td>
            <td>
			<input type="radio" name="sex" value="1" <?= (@$info->sex==1)?'checked':''?> />Male&nbsp;&nbsp;
			<input type="radio" name="sex" value="2" <?= (@$info->sex==2)?'checked':''?> />Female</td>
        </tr>
        <tr class="odd">
            <td>5. Marital Status</td>
            <td>
			<input type="radio" name="marital_status" value="1" <?= (@$info->marital_status==1)?'checked':''?>/> Never Married<br />
			<input type="radio" name="marital_status" value="2" <?= (@$info->marital_status==2)?'checked':''?>/> Married<br />			
            <input type="radio" name="marital_status" value="3" <?= (@$info->marital_status==3)?'checked':''?>/> Divorced<br />
            <input type="radio" name="marital_status" value="4" <?= (@$info->marital_status==4)?'checked':''?>/> Widowed</td>
            <td>&nbsp;</td>
            <td>6. Have you at any time applied for a permit to settlepermanently in Namibia? </td>
            <td><input type="radio" name="has_applied" value="1" <?= (@$info->has_applied==1)?'checked':''?>/> Yes&nbsp;&nbsp;
			<input type="radio" name="has_applied" value="0" <?= (@$info->has_applied==0)?'checked':''?>/> No</td>
        </tr>
        <tr class="even">
            <td>7. Have you ever been restricted or refused entry into Namibia?</td>
            <td><input type="radio" name="has_refused" value="1" <?= (@$info->has_refused==1)?'checked':''?>/> Yes&nbsp;&nbsp;
			<input type="radio" name="has_refused" value="0" <?= (@$info->has_refused==0)?'checked':''?>/> No</td>
            <td>&nbsp;</td>
            <td>8. Have you ever been deported or orderedto leave Namibia?</td>
            <td><input type="radio" name="has_been_deported" value="1" <?= (@$info->has_been_deported==1)?'checked':''?>/> Yes&nbsp;&nbsp;
			<input type="radio" name="has_been_deported" value="0" <?= (@$info->has_been_deported==0)?'checked':''?>/> No</td>
        </tr>
        <tr class="odd">
            <td>9. Have you ever been convicted of any crime in any country?</td>
            <td><input type="radio" name="has_crime" value="1" <?= (@$info->has_crime==1)?'checked':''?>/> Yes&nbsp;&nbsp;
			<input type="radio" name="has_crime" value="0" <?= (@$info->has_crime==0)?'checked':''?>/> No</td>
			<td>&nbsp;</td>
			<td>10. Are you suffering from tuberculosis, or any other contagious lung disease; trachoma, or any other chronic eye infection,
frambesia, yaws, scabies or any other contagious bacterial or other skin disease; syphilis or any other venereal disease;
or leprosy or acquired immune deficiency syndrom virus (aids virus), or any mental illness or affliction?</td>
			<td><input type="radio" name="has_tuberculosis" value="1" <?= (@$info->has_tuberculosis==1)?'checked':''?>/> Yes&nbsp;&nbsp;
			<input type="radio" name="has_tuberculosis" value="0" <?= (@$info->has_tuberculosis==0)?'checked':''?>/> No</td>
        </tr>
        <tr class="even">
          <td colspan="5">11. If the reply to any of the questions 6 to 9 is in the affirmative, attach full particulars.			  </td>
        </tr>
        <tr class="odd">
            <td>12. Birth</td>
            <td colspan="2">
			Date<input type="text" name="birth" value="<?= @$info->birth?>" id="birth" /><br />
			Place<input type="text" name="birth_place" value="<?= @$info->birth_place?>" /><br/>
			Country<input type="text" name="birth_country" value="<?= @$info->birth_country?>" /></td>
			<td>13. Citizenship(If acquired by naturalization, state original citizenship.)</td>
			<td><input type="text" name="citizenship" value="<?= @$info->citizenship?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="2">14. Passport</td>
            <td colspan="3">
			(a) Number<input type="text" name="travel_document_num" value="<?= @$info->travel_document_num?>" />
			(b) Place of issue<input type="text" name="travel_document_issue_by" value="<?= @$info->travel_document_issue_by?>" /><br />
			(c) Date of issue<input type="text" name="travel_document_issue_date" value="<?= @$info->travel_document_issue_date?>" id="travel_document_issue_date" />
			(d) Date of expiry<input type="text" name="travel_document_valid_date" value="<?= @$info->travel_document_valid_date?>" id="travel_document_valid_date" /><br/>
			(e) Is passport valid for travel to Namibia?  
            <input type="radio" name="is_valid_for" value="1" <?= (@$info->is_valid_for==1)?'checked':''?>/> Yes&nbsp;&nbsp;
			<input type="radio" name="is_valid_for" value="0" <?= (@$info->is_valid_for==0)?'checked':''?>/> No</td>
        </tr>
        <tr class="odd">
            <td colspan="5">
			15. (a) Present residential address<input type="text" name="present_address" value="<?= @$info->present_address?>" style="width:300px" /><br/>
			(b) Telephone number: Code:<input type="text" name="present_tel_code" value="<?= @$info->present_tel_code?>" /> No.: <input type="text" name="present_tel_num" value="<?= @$info->present_tel_num?>" /> </td>
        </tr>
        <tr class="even">
            <td colspan="5">16. Address and period of residence in country of which you are a permanent resident<br/>
			(a) Residential address 
			  <input type="text" name="permanent_address" value="<?= @$info->permanent_address?>" style="width:300px" /><br />
			  (b) Telephone number: Code:
			  <input type="text" name="permanent_tel_code" value="<?= @$info->permanent_tel_code?>" />
			No.:<input type="text" name="permanent_tel_num" value="<?= @$info->permanent_tel_num?>" /><br />
			(c) Period <input type="text" name="permanent_period" value="<?= @$info->permanent_period?>" /></td>
        </tr>
		<tr class="odd">
            <td colspan="5">17. Occupation pr profession 
              <input type="text" name="occupation" value="<?= @$info->occupation?>" style="width:300px" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">18. Firm, company, university, etc., to which you are attached or which you represent<br/>
			(a) Name and adress of employer 
			  <input type="text" name="com_name" value="<?= @$info->com_name?>" style="width:300px" /> <br />
			  (b) Telephone number: Code:
              <input type="text" name="com_tel_code" value="<?= @$info->com_tel_code?>" />
			  No.:<input type="text" name="com_tel_num" value="<?= @$info->com_tel_num?>" /><br />
			(c) Nature of business 
			<input type="text" name="com_business" value="<?= @$info->com_business?>" style="width:300px" /><br />
			(d) If a student, name of university to which you are attached and the course pursued 
			<input type="text" name="university_name" value="<?= @$info->university_name?>" style="width:300px" /></td>
        </tr>		
        <tr class="odd">
            <td colspan="5">19. If accompanied by your wife and children state<br />
              a. FIRST NAMES <input type="text" name="accompany1_name" value="<?= @$info->accompany1_name?>" /> &nbsp;&nbsp;
			  DATE OF BIRTH <input type="text" name="accompany1_birth" value="<?= @$info->accompany1_birth?>" id="accompany1_birth" /> &nbsp;&nbsp;
			  PLACE OF BIRTH <input type="text" name="accompany1_birth_place" value="<?= @$info->accompany1_birth_place?>" /><br />
              b. FIRST NAMES <input type="text" name="accompany2_name" value="<?= @$info->accompany2_name?>" /> &nbsp;&nbsp;
			  DATE OF BIRTH <input type="text" name="accompany2_birth" value="<?= @$info->accompany2_birth?>" id="accompany2_birth" /> &nbsp;&nbsp;
			  PLACE OF BIRTH <input type="text" name="accompany2_birth_place" value="<?= @$info->accompany2_birth_place?>" /><br />
			  c. FIRST NAMES <input type="text" name="accompany3_name" value="<?= @$info->accompany3_name?>" /> &nbsp;&nbsp;
			  DATE OF BIRTH <input type="text" name="accompany3_birth" value="<?= @$info->accompany3_birth?>" id="accompany3_birth" /> &nbsp;&nbsp;
			  PLACE OF BIRTH <input type="text" name="accompany3_birth_place" value="<?= @$info->accompany3_birth_place?>" /><br />
			  </td>
        </tr>
        <tr class="even">
            <td colspan="5">20. (a) What amount of money will you have available on arrival in Namibia for your own use? N$ 
              <input type="text" name="money_amount" value="<?= @$info->money_amount?>" /><br />
              (b) Will you be in possession of an onward / return ticket? 
              <input type="radio" name="has_ticket" value="1" <?= (@$info->has_ticket==1)?'checked':''?>/> Yes&nbsp;&nbsp;
			<input type="radio" name="has_ticket" value="0" <?= (@$info->has_ticket==0)?'checked':''?>/> No</td>
        </tr>
        <tr class="odd">
            <td colspan="5">
           (N.B. Separate applications have to be completeds in respect of your spouse or children over the age of 16 years and children travelling with their own passports.)</td>
        </tr>
        <tr class="even">
            <td colspan="5" align="center">NOTE: COMPLETE ONLY PART A OR B<br />( A) HOLIDAY / BUSINESS / WORK / TRANSIT VISA</td>
        </tr>

        <tr class="odd">
            <td colspan="5">1. Intended date and port of arrival in Namibia 
			<input type="text" name="arrival_date" value="<?= @$info->arrival_date?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">2. ( a ) What is the purpose of your visits? 
              <input type="text" name="visit_purpose" value="<?= @$info->visit_purpose?>" style="width:300px" /><br />
              ( b ) If it is for business purposes, explain in detail the nature of business 
              <input type="text" name="business_purpose" value="<?= @$info->business_purpose?>" style="width:300px" /><br />
              ( c ) Duration of intended visit (Number of days, weeks or months):
              <input type="text" name="visit_duration" value="<?= @$info->visit_duration?>" style="width:300px" /></td>
        </tr>
        <tr class="odd">
            <td colspan="5">3. Places to be visited in Namibia (full addresses, including telephone number must be provided)<br />
              <input type="text" name="visit_address" value="<?= @$info->visit_address?>" style="width:500px" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">4. If the purpose of your visit is for medical treatment, please provide the following information<br />
              ( a ) Name of doctor, hospital or clinic you will visit 
                <input type="text" name="hospital_name" value="<?= @$info->hospital_name?>" style="width:300px" /> <br />
              ( b ) Who will pay for your medical expenses and hospital fees 
              <input type="text" name="hospital_fee" value="<?= @$info->hospital_fee?>" style="width:300px" /> <br />
              ( c ) If you are liable for the expenses and fees above, state amount of funds available 
              <input type="text" name="hospital_amount" value="<?= @$info->hospital_amount?>" style="width:300px" /></td>
        </tr>
        <tr class="odd">
            <td colspan="5">5. Proposed residential addres in Namibia 
              <input type="text" name="propose_address" value="<?= @$info->propose_address?>" style="width:300px" />  
			  Tel. No.<input type="text" name="propose_tel"  value="<?= @$info->propose_tel?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">6. Names and address of relatives in Namibia<br />
              ( a )  NAME 
              <input type="text" name="relative1_name"  value="<?= @$info->relative1_name?>" />&nbsp;
			  ADDRESS AND TELEPHONE NUMBER 
              <input type="text" name="relative1_address" value="<?= @$info->relative1_address?>" style="width:300px" />&nbsp;
			  RELATIONSHIP
              <input type="text" name="relative1_relate" value="<?= @$info->relative1_relate?>" />
              <br />
              ( b )  NAME 
              <input type="text" name="relative2_name"  value="<?= @$info->relative2_name?>" />&nbsp;
			  ADDRESS AND TELEPHONE NUMBER 
              <input type="text" name="relative2_address" value="<?= @$info->relative2_address?>" style="width:300px" />&nbsp;
			  RELATIONSHIP
              <input type="text" name="relative2_relate" value="<?= @$info->relative2_relate?>" /></td>
        </tr>
        <tr class="odd">
            <td colspan="5">7. Date of last visit, if any, to Namibia 
              <input type="text" name="last_visit_date"  value="<?= @$info->last_visit_date?>" style="width:300px" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">8. Do you contribute professionally or otherwise to publications, radio, television or films? If so, please give details <br />
			  <input type="text" name="contribute" value="<?= @$info->contribute?>" style="width:500px" /></td>
        </tr>
        <tr class="odd">
            <td colspan="5">9. ( a ) Destination after leaving Namibia 
              <input type="text" name="leaving_destination" value="<?= @$info->leaving_destination?>" style="width:300px" /><br />
              ( b ) Mode of travel to destination 
              <input type="text" name="travel_mode" value="<?= @$info->travel_mode?>" style="width:300px" /><br />
              ( c ) Intended day and port of departure 
              <input type="text" name="departure_date" value="<?= @$info->departure_date?>" style="width:300px" /><br />
              ( d ) Is your entry to that destination assured, e.g. do you hold a visa or a permit for permanent or temporary residence? (proof to be submitted)<br />
              <input type="text" name="destination_permit" value="<?= @$info->destination_permit?>" style="width:500px" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">10. Reasons for travelling through Namibia? 
              <input type="text" name="through_reason" value="<?= @$info->through_reason?>" style="width:300px" /></td>
        </tr>
        <tr class="odd">
            <td colspan="5" align="center">(b) RETURN VISA</td>
        </tr>
        <tr class="even">
            <td colspan="5">IMPORTANT<br/>
An applicant has to:<br/>
(i) produce his or her passport or travel document; <br/>
(ii) submit proof of his or her right of residence in Namibia if not endorsed in his or her passport.</td>
        </tr>
        <tr class="odd">
            <td colspan="5">1. ( a ) Kind of permit and number 
              <input type="text" name="return_permit" style="width:300px" value="<?= @$info->return_permit?>" />
              <br />
              ( b ) Date of departure 
              <input type="text" name="return_departure_date" style="width:300px" value="<?= @$info->return_departure_date?>" id="return_departure_date" />
              <br />
              ( c ) Expected date of return 
              <input type="text" name="return_expected_date" style="width:300px" value="<?= @$info->return_expected_date?>" id="return_expected_date" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">2. Particulars of residence in Namibia<br/>
			( a ) DATE OF FIRST ENTRY 
			<input type="text" name="return_first_date1" value="<?= @$info->return_first_date1?>" /> &nbsp;PORT OF ENTRY <input type="text" name="return_first_port1" value="<?= @$info->return_first_port1?>" />&nbsp;PERIODS OF RESIDENCE IN NAMIBIA FROM<input type="text" name="return_first_from1" value="<?= @$info->return_first_from1?>" /> TO <input type="text" name="return_first_to1" value="<?= @$info->return_first_to1?>" />
			<br />
			( b ) DATE OF FIRST ENTRY 
			<input type="text" name="return_first_date2" value="<?= @$info->return_first_date2?>" /> &nbsp;PORT OF ENTRY <input type="text" name="return_first_port2" value="<?= @$info->return_first_port2?>" />&nbsp;PERIODS OF RESIDENCE IN NAMIBIA FROM<input type="text" name="return_first_from2" value="<?= @$info->return_first_from2?>" /> TO <input type="text" name="return_first_to2" value="<?= @$info->return_first_to2?>" />
			<br />
			( c ) DATE OF FIRST ENTRY 
			<input type="text" name="return_first_date3" value="<?= @$info->return_first_date3?>" /> &nbsp;PORT OF ENTRY <input type="text" name="return_first_port3" value="<?= @$info->return_first_port3?>" />&nbsp;PERIODS OF RESIDENCE IN NAMIBIA FROM<input type="text" name="return_first_from3" value="<?= @$info->return_first_from3?>" /> TO <input type="text" name="return_first_to3" value="<?= @$info->return_first_to3?>" />
			</td>
        </tr>
        <tr class="odd">
            <td colspan="5">3. Countries to which you will be travelling<br/>
			( a )
			  <input type="text" name="return_travel1" value="<?= @$info->return_travel1?>" /> 
			  ( b )
			  <input type="text" name="return_travel2" value="<?= @$info->return_travel2?>" />
			  ( c )
			  <input type="text" name="return_travel3" value="<?= @$info->return_travel3?>" /> 
			  ( d )
			  <input type="text" name="return_travel4" value="<?= @$info->return_travel4?>" /></td>
        </tr>
        <tr class="even">
            <td colspan="5">4. Purpose of journey (explain fully) 
              <input type="text" name="return_journey_purpose" value="<?= @$info->return_journey_purpose?>" style="width:500px" /></td>
        </tr>
        <tr class="odd">
            <td colspan="5">I solemnly declare that the above particulars given by me are true in substance and in fact and that I fully understand the meaning thereof.</td>
        </tr>
    </tbody>
	</table>
<!-- table end -->
</form>

			</div>
		</div>
		
		<?=$this->load->view('include_sidebar',array('id'=>$id,'forms'=>$forms))?>
	</div>

<script type="text/javascript">
$().ready(function() {
  $("#form").validate({
    rules: {
		surname:"required",
		firstname:"required",
		marital_status:"required",
		birth:"required",
		travel_document_num:"required",
		travel_document_issue_by:"required",
		travel_document_issue_date:"required",
		travel_document_valid_date:"required",
		is_valid_for:"required"
    }
  });
  
	$.datepicker.setDefaults(
		{
		dateFormat: 'yy/mm/dd',
		changeMonth: true,
		changeYear: true,
		showOn: "both",
		buttonImage: "images/calendar.gif",
		buttonImageOnly: true
		}
	);

	$("#birth").datepicker();
	$("#travel_document_issue_date").datepicker();
	$("#travel_document_valid_date").datepicker();
	$("#accompany1_birth").datepicker();
	$("#accompany2_birth").datepicker();
	$("#accompany3_birth").datepicker();
	$("#return_departure_date").datepicker();
	$("#return_expected_date").datepicker();

	$("#printInfo").click(function(o) {
		var prints = [
			{rel_id: <?=$cateid?>, rec_id: <?=$id?>}
		]  ;
		
		var jdata = JSON.stringify(prints);
		//alert(jdata);
		$.post("<?=site_url('proxy/does/'.str_replace('==','',base64_encode('http://'.$_SERVER['SERVER_NAME'].':9090/javaprduct/servlet/test')))?>",{clients:jdata},function(msg){alert(msg)});
	});
	
	$("#printInfo").ajaxError(function(event,request, settings){
		//$(this).append("<li>出错页面:" + settings.url + "</li>");
		alert("无法访问"+ settings.url );
	}); 
 
});
</script>

<?=$this->load->view('include_footer',null)?>